\(\int \frac {\sqrt {1-x^2}}{1+x} \, dx\) [821]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 14 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\sqrt {1-x^2}+\arcsin (x) \]

[Out]

arcsin(x)+(-x^2+1)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {679, 222} \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\arcsin (x)+\sqrt {1-x^2} \]

[In]

Int[Sqrt[1 - x^2]/(1 + x),x]

[Out]

Sqrt[1 - x^2] + ArcSin[x]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 679

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m + 1)*((a + c*x^2)^p/(e
*(m + 2*p + 1))), x] - Dist[2*c*d*(p/(e^2*(m + 2*p + 1))), Int[(d + e*x)^(m + 1)*(a + c*x^2)^(p - 1), x], x] /
; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && (LeQ[-2, m, 0] || EqQ[m + p + 1, 0]) && NeQ[
m + 2*p + 1, 0] && IntegerQ[2*p]

Rubi steps \begin{align*} \text {integral}& = \sqrt {1-x^2}+\int \frac {1}{\sqrt {1-x^2}} \, dx \\ & = \sqrt {1-x^2}+\sin ^{-1}(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(32\) vs. \(2(14)=28\).

Time = 0.12 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.29 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\sqrt {1-x^2}-2 \arctan \left (\frac {\sqrt {1-x^2}}{1+x}\right ) \]

[In]

Integrate[Sqrt[1 - x^2]/(1 + x),x]

[Out]

Sqrt[1 - x^2] - 2*ArcTan[Sqrt[1 - x^2]/(1 + x)]

Maple [A] (verified)

Time = 2.30 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.29

method result size
default \(\sqrt {-\left (1+x \right )^{2}+2+2 x}+\arcsin \left (x \right )\) \(18\)
risch \(-\frac {x^{2}-1}{\sqrt {-x^{2}+1}}+\arcsin \left (x \right )\) \(20\)
trager \(\sqrt {-x^{2}+1}+\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )\) \(37\)

[In]

int((-x^2+1)^(1/2)/(1+x),x,method=_RETURNVERBOSE)

[Out]

(-(1+x)^2+2+2*x)^(1/2)+arcsin(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.00 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\sqrt {-x^{2} + 1} - 2 \, \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) \]

[In]

integrate((-x^2+1)^(1/2)/(1+x),x, algorithm="fricas")

[Out]

sqrt(-x^2 + 1) - 2*arctan((sqrt(-x^2 + 1) - 1)/x)

Sympy [A] (verification not implemented)

Time = 1.04 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\begin {cases} \sqrt {1 - x^{2}} + \operatorname {asin}{\left (x \right )} & \text {for}\: x > -1 \wedge x < 1 \end {cases} \]

[In]

integrate((-x**2+1)**(1/2)/(1+x),x)

[Out]

Piecewise((sqrt(1 - x**2) + asin(x), (x > -1) & (x < 1)))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\sqrt {-x^{2} + 1} + \arcsin \left (x\right ) \]

[In]

integrate((-x^2+1)^(1/2)/(1+x),x, algorithm="maxima")

[Out]

sqrt(-x^2 + 1) + arcsin(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\sqrt {-x^{2} + 1} + \arcsin \left (x\right ) \]

[In]

integrate((-x^2+1)^(1/2)/(1+x),x, algorithm="giac")

[Out]

sqrt(-x^2 + 1) + arcsin(x)

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {1-x^2}}{1+x} \, dx=\mathrm {asin}\left (x\right )+\sqrt {1-x^2} \]

[In]

int((1 - x^2)^(1/2)/(x + 1),x)

[Out]

asin(x) + (1 - x^2)^(1/2)